package cn.clx.ymcc.service.impl;

import cn.clx.ymcc.domain.PayOrder;
import cn.clx.ymcc.mapper.PayOrderMapper;
import cn.clx.ymcc.service.IPayOrderService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author clx
 * @since 2022-07-31
 */
@Service
public class PayOrderServiceImpl extends ServiceImpl<PayOrderMapper, PayOrder> implements IPayOrderService {

    /**
     * 查询是否有此订单
     * @param ordersn
     * @return
     */
    @Override
    public PayOrder checkPayOrder(String ordersn) {
        Wrapper<PayOrder> wrapper = new EntityWrapper<>();
        wrapper.eq("order_no",ordersn);
        return selectOne(wrapper);
    }
}
